package com.wmx.newspushmonitor.util;

import android.app.Activity;

import com.rhino.ui.utils.SharedPreferencesUtils;
import com.rhino.ui.utils.ui.ToastUtils;
import com.wmx.newspushmonitor.MainActivity;
import com.wmx.newspushmonitor.NotifySettingActivity;

/**
 * @author LuoLin
 * @since Create on 2019/3/6.
 */
public class UiUtils {

    public static void showMainPage(Activity activity) {
        if (SharedPreferencesUtils.getInstance().getBoolean("isFirst", true)) {
            ToastUtils.show("首次使用，请先设置推送权限！");
            NotifySettingActivity.show(activity, true);
        } else {
            MainActivity.show(activity);
        }
    }

}
